#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 505;

int n, m;
int x[N], y[N];
int dis(int i, int j) {
  int dx = x[i] - x[j];
  int dy = y[i] - y[j];
  return dx * dx + dy * dy;
}
int num;
struct Edge {
  int x, y, z;
  bool operator<(Edge o) const { return z < o.z; }
} e[N * N];
int f[N];
void init(int n) { rep(i, 1, n) f[i] = i; }
int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); }
bool merge(int x, int y) {
  int fx = find(x), fy = find(y);
  if (fx == fy) return false;
  f[fy] = fx;
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> m >> n;
  init(n);
  rep(i, 1, n) cin >> x[i] >> y[i];
  rep(i, 1, n) rep(j, i + 1, n) {
    int d = dis(i, j);
    e[++num] = Edge{i, j, d};
  }
  sort(e + 1, e + num + 1);
  int cnt = n - m;
  rep(i, 1, num) {
    if (merge(e[i].x, e[i].y)) cnt--;
    if (!cnt) {
      cout << fixed << setprecision(2) << sqrt(e[i].z);
      exit(0);
    }
  }
  return 0;
}